﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XsqTech.SmartOA.Dtos.DTO
{
    public class UserDto
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        [StringLength(50)]
        [Required]//特性注解
        public string UserName { get; set; }
        /// <summary>
        /// 用户手机
        /// </summary>
        [Required]
        [StringLength(20)]
        public string UserPhone { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string? HeadPortrait { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Required, StringLength(50)]
        public string UserMailbox { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required, StringLength(10)]
        public string UserSex { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public int State { get; set; } //1是禁用，0是启用

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; } = DateTime.Now;
        public List<string>? Roles { get; set; }
    }

    public class UserRoleDto
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 角色Id
        /// </summary>
        public Guid RoleId { get; set; }
    }
}
